package com.ea.eadp.nexus.test.pageDefinition.mobile;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;

/**
 * Created by ChuanYe on 9/5/2014.
 */
public class FifaMobileLoginPage extends MobileBasePage {
    //todo:put a valid element
    public final static String fifaMobileLoginPage = "FifaMobileLoginPage";
    public static final String emailInputBox = "email";
    public static final String passwordInputBox = "password";

    public FifaMobileLoginPage(WebDriver driver) {
        super(driver, LoginPage.class, fifaMobileLoginPage);
    }

    public void navigate(String uri) {
        driver.switchTo().window(operationWindowHandle);
        log.info(uri);
        driver.navigate().to(uri);
    }

    public void enterEmail(String email) {
        log.info("Enter Email:" + email);
        sendInput(emailInputBox, email);
    }

    public void enterPassword(String password) {
        log.info("Enter Password:" + password);
        sendInput(passwordInputBox, password);
    }

    public void login() {
        log.info("Login");
        driver.findElement(By.cssSelector("input.fut-btn")).click();
    }
}
